# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-ddt
pkgver=1.7.0
pkgrel=1
pkgdesc="Data-Driven/Decorated Tests"
arch=('any')
license=('MIT')
url="https://github.com/txels/ddt"
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-aiounittest' 'python-six' 'python-yaml')
source=("$pkgname-$pkgver.tar.gz::https://github.com/txels/ddt/archive/$pkgver.tar.gz")
sha512sums=('1f049c1f86cd58867b6ef3d094310e78c94bd11f5602e8a9ffe392bbcf173f23be4f6b77730953b7d747d56a31a3a378d229c7d697383c2e3ce4517d12d13d2d')

build() {
  cd ddt-$pkgver
  python setup.py build
}

check() {
  cd ddt-$pkgver
  pytest
}

package() {
  cd ddt-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
}
